(function(win){
	var Z = win.Z,
		Bundle = Z.Bundle,
		BundleList = Z.BundleList;

	var bundle = new Bundle({'tmpl' : 'profile'});
	
	//bundle.addEvent();
	
	bundle.onload = function(){
		var images = [
			'http://image.zcool.com.cn/img3/50/46/m_1368363222313.jpg',
			'http://image.zcool.com.cn/img3/59/63/m_1368363222318.jpg',
			'http://image.zcool.com.cn/img3/46/1/m_1368363222966.jpg',
			'http://image.zcool.com.cn/img3/57/46/m_1368363222871.jpg',
			'http://image.zcool.com.cn/img3/29/15/m_1368363222247.jpg',
			'http://image.zcool.com.cn/img3/49/55/m_1369453004468.jpg',
			'http://image.zcool.com.cn/img3/49/10/m_1369451388070.jpg',
			'http://www.tuyiyi.com/images/201305/1369750504665.jpg'
		];

		if($('ul#left li#user-info span:eq(0)').html() != '192.168.187.27'){
			var index = Math.floor(Math.random() * 100) % images.length;
			//bundle.find('img').attr('src', images[index]);
		}

		var funny = 'http://wyxgame-club.stor.appsina.com/attachment/1306/thread/25_2076857492_54654231239a773.jpg';
		//bundle.find('img').attr('src', funny);

		bundle.find('form:eq(0)').attr('action', Z.route('User', 'changeAvatar'));
	};

	BundleList.append(bundle);
})(window);